﻿using System;
using System.Collections.Generic;
using Meqs.Entity;

namespace Meqs.Logic.Interface
{
    public interface IStuCauseEvalItemLogic : ICommonLogic<StuCauseEvalItem, int>
    {
        /// <summary>
        /// 获取学分项目
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<StuCauseEvalItemView> GetStuCauseEvalItemList(string schoolMark);

        /// <summary>
        /// 获取学分项目
        /// </summary>
        /// <param name="schoolYear"></param>
        /// <param name="term"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<StuCauseEvalItemView> GetStuCauseEvalItemList(string schoolMark, int schoolYear, int term);

        /// <summary>
        /// 获取学分小类
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="typeID"></param>
        /// <returns></returns>
        IList<StuCauseEvalItem> GetItemByType(string schoolMark, int typeID);

        /// <summary>
        /// 获取学分单项
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="itemID"></param>
        /// <returns></returns>
        StuCauseEvalItem GetItemByID(string schoolMark, int itemID);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="rid"></param>
        /// <returns></returns>
        int DeleteById(string schoolMark, int rid);


        /// <summary>
        /// 使用事务，先删除，再添加
        /// </summary>
        /// <param name="listDel"></param>
        /// <param name="listAdd"></param>
        /// <returns></returns>
        int InsertCauseItem(string schoolMark, List<VStuCauseEvalHistoryTypeItem> listDel, List<VStuCauseEvalHistoryTypeItem> listAdd);

        /// <summary>
        /// 删除大类下的项
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <param name="typeId"></param>
        /// <returns></returns>
        int DeleteByTypeId(string schoolMark, int typeId);
    }
}